import os
from importlib.resources import path

old_name='Pc'
new_name='Ch1'
old_dir_path=input('please input file dir path:')
new_dir_path=old_dir_path
filename_list = os.listdir(old_dir_path)
for filename in filename_list:
    name=''
    if old_name in filename:
        idle_name=filename[len(old_name):]
        name=new_name+idle_name
        #print(os.path.join(old_dir_path,filename))
        #print(os.path.join(new_dir_path,name))
        os.renames(os.path.join(old_dir_path,filename),os.path.join(new_dir_path,name))
    #print('-----------------------------')
    
filename_list = os.listdir(new_dir_path)
for filename in filename_list:
    print(filename)
print('----------change successful!!-----------')
